﻿namespace LearnMiddleware.MiddleComponents;

public class MyCustomMiddleware:IMiddleware
{
 
    public async Task InvokeAsync(HttpContext context, RequestDelegate next)
    {
        await context.Response.WriteAsync("My Custom Middleware #1:Before calling next\r\n");
      
        await next(context);
    
        await context.Response.WriteAsync("My Custom Middleware #1:After calling next\r\n");
    }
}